<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_lawyer.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.trade.ts_area.*" %>
<%@page import="com.lmpop.trade.ti_member.Ti_memberInfo;"%>


  <% 
    Ti_memberInfo ti_memberInfo = new Ti_memberInfo();
	String cust_id = "", cust_level="";	
	if( session.getAttribute("session_cust_id") != null ){
		cust_id = session.getAttribute("session_cust_id").toString();
		List cust_levelList = ti_memberInfo.getListByPk(cust_id);
		if(cust_levelList!=null&&cust_levelList.size()>0){
			 Map p = (Hashtable)cust_levelList.get(0);
			 if(p!=null &&p.size()>0){
			     cust_level = p.get("user_class").toString();
			 }
		 }
	}
//out.print(cust_id);	
	Ts_areaInfo areaBean = new Ts_areaInfo();
    Ti_LawyerInfo ti_lawyerInfo = new Ti_LawyerInfo();
	List list = ti_lawyerInfo.getListByPk(cust_id);
//out.print(list);  	
	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String  user_name="", password="", email="", real_name="", license_no="",
  	company_name="", area_attr="", cellphone="", professional="", phone="", qq="", address="",cust_class="",
  	postcode="", cust_desc="", company_id="", cust_type="", state_code="", user_type="", cust_name="", user_class="";
  	if(map.get("user_name")!=null) user_name = map.get("user_name").toString();
  	if(map.get("real_name")!=null) real_name = map.get("real_name").toString();
  	if(map.get("license_no")!=null) license_no = map.get("license_no").toString();
  	if(map.get("company_name")!=null) company_name = map.get("company_name").toString();
  	if(map.get("professional")!=null) professional = map.get("professional").toString();
  	if(map.get("area_attr")!=null) area_attr = map.get("area_attr").toString();
  	if(map.get("postcode")!=null) postcode = map.get("postcode").toString();
  	if(map.get("address")!=null) address = map.get("address").toString();
  	if(map.get("phone")!=null) phone = map.get("phone").toString();
  	if(map.get("email")!=null) email = map.get("email").toString();
  	if(map.get("cellphone")!=null) cellphone = map.get("cellphone").toString();
  	if(map.get("cust_class")!=null) cust_class = map.get("cust_class").toString();
  	if(map.get("qq")!=null) qq = map.get("qq").toString();		
			String areaAttr = "";	
		if (map.get("area_attr") != null) {
		area_attr = map.get("area_attr").toString();
		String areaArr[] = area_attr.split("\\|");
		for( int k = 0; k < areaArr.length; k++ ){
			areaAttr = areaAttr + " &nbsp; " + areaBean.getAreaNameById( areaArr[k]);
		}
	}
	if(map.get("cust_type")!=null) cust_type = map.get("cust_type").toString();	
	if(map.get("state_code")!=null) state_code = map.get("state_code").toString();	
	if(map.get("user_class")!=null) user_class = map.get("user_class").toString();	
	if(map.get("cust_name")!=null) cust_name = map.get("cust_name").toString();
	
  %>
	
	<script language="javascript" type="text/javascript" src="/program/plugins/calendar/WdatePicker.js"></script>
	<script language="javascript" type="text/javascript" src="lawyer_view.js"></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ts_areaInfo.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
	<script language="javascript" type="text/javascript" src="js_customer.js"></script>
	
<div class="f-right w750">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#eddfea">
      <tr>
        <td width="5%" height="40" align="center"><img src="/program/member/index/images/icon1.gif" /></td>
        <td width="75%"><h3>用户资料信息维护</h3></td>

      </tr>
    </table>

    <!--Content部分开始-->
    <DIV class="focus-area-setTab">
      <DIV class="focus-area-setTab-menu">
        <DIV class="clear"></DIV>
      </DIV>
      <DIV class="focus-area-setTab-content">
        <DIV id=con_one_1 >
          <table width="100%" border="0" cellspacing="0" bgcolor="#fcf8fb" cellpadding="0" style="border-bottom:3px solid #eddfea; padding-left:15px;">
            <tr bgcolor="#fcf8fb">
              <td height="100" valign="top">
		  	<form action="/doTradeReg.do" name="addForm" method="post">
		  		
			  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:12px;">
                  <tr>
                    <td  height="38" align="right" width="20%"  class="art_col">会员当前级别:</td>
                    <td><%if(cust_level.equals("6")){%>普通会员<%}else if(cust_level.equals("8")){%>铜牌会员<%}else if(cust_level.equals("9")){%>银牌会员<%}else if(cust_level.equals("9")){%>金牌会员<%}%>
                    <input name="user_class" id="user_class" value="<%=cust_level %>" type="hidden"  />
                    <a href="/templets/html/lawyer/chongzhi.jsp?ctype=Upgrade" >会员充值</a>
                    </td>
                  </tr>
                  <tr>
                    <td  height="38" align="right" width="20%"  class="art_col">真实姓名：</td>
                    <td><input name="real_name" id="real_name" value="<%=real_name %>" type="text" maxlength="50" /></td>
                  </tr>
				  
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">*身份证号码：</td>
				  <td><input name="license_no" id="license_no"  type="text" maxlength="50" value="<%=license_no %>"/></td>
				  </tr>
	             
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">所在公司：</td>
				  <td>
				<input type="text" name="company_name" id="company_name" value="<%=company_name %>"/> 
				  </td>
				  </tr>						  
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">擅长领域：</td>
				  <td>
				<input type="text" name="professional" id="professional" value="<%=professional %>"/> 
				  </td>
				  </tr>		
				<tr>					
					<td  height="38" align="right" width="20%"  class="art_col">所在地区：</td>
				<td colspan="3">
				<div id="org1">
					<font color="#CECECE"><span id="areaoutput"><%=areaAttr%></span></font>
					<input type="button" name="buttons" value="选择地区" class="button2" onclick="ChangeOrg()" />
				</div>
				<div style="display:none;float:left" id="org2">
					<select name="province" id="province" onclick="setCitys(this.value)">
					  <option value="">省份</option> 
					</select>
					<select name="eparchy_code" id="eparchy_code" onclick="setAreas(this.value)">
					  <option value="">地级市</option> 
					 </select>
					<select name="city_code" id="city_code" style="display:inline" >
					 <option value="">市、县级市、县</option> 
					</select>
				</div>
					<input type="hidden" name="area_attr_bak" id="area_attr_bak" value="<%=area_attr %>" />
					<input type="hidden" name="area_attr" id="area_attr" value="<%=area_attr %>" />
				</td>
			</tr>
              
                  <tr>
                    <td height="38" align="right"  class="art_col">邮政编码：</td>
					<td><input name="postcode" id="postcode" value="<%=postcode %>" type="text"  onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''" maxlength="9" /></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">家庭住址：</td>
					<td><input name="address" id="address" value="<%=address %>" type="text" size="50"/></td>
                  </tr>	
				  				  				  
                  <tr >
                    <td height="38" align="right"  class="art_col">手机号码：</td>
					<td><input name="cellphone" id="cellphone" value="<%=cellphone %>" type="text" maxlength="50"/></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">固定电话：</td>
					<td><input name="phone" id="phone" value="<%=phone %>" type="text" maxlength="50" /></td>
                  </tr>
				  
				  <tr>
                    <td height="38" align="right"  class="art_col">邮箱：</td>
					<td><input name="email" id="email" value="<%=email%>" type="text" maxlength="50" /></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">QQ：</td>
					<td><input name="qq" id="qq" value="<%=qq %>" type="text" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''" /></td>
                  </tr>
				  
				  <input type="hidden" name="bpm_id" value="8204" />
				  <input type="hidden" name="user_name" value="<%=user_name%>" />
				  <input type="hidden" name="cust_type" value="<%=cust_type%>" />
				  <input type="hidden" name="state_code" value="<%=state_code%>" />
				  <input type="hidden" name="user_class" value="" />
 	  			  <input type="hidden" name="cust_id" value="<%=cust_id%>" />
				  <input type="hidden" name="cust_name" value="<%=cust_name%>"/>
				  <input type="hidden" name="cust_class" value="<%=cust_class %>"/>
                </table>
				</form>
				</td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" >
            <tr>
              <td height="50" align="center">

			  <input type="button" name="Submit2" value="确定" class="button2" onclick="return submitForm();">
              </td>
            </tr>
          </table>
        </DIV>
      
      </DIV>
    </DIV>
  </div>
</div>